package pri.jz.keeper.ui.content.personal.setting

import android.app.Application
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import pri.jz.keeper.ui.base.BaseViewModel

/**
 *Author by: JZ
 *Email: 2451756617@qq.com
 *PS:
 */
class SettingViewModel(application: Application) : BaseViewModel(application) {
    private val _state = MutableStateFlow(SettingState.DEFAULT)
    val state = _state.asStateFlow()



    fun setState(state: SettingState) {
        if (_state.value != state) {
            _state.value = state
            _state.value = SettingState.DEFAULT
        }
    }
}